package Work4.Slay_the_Maze.Potions;

import java.util.ArrayList;

import Work4.Slay_the_Maze.Monsters.Monster;
import Work4.Slay_the_Maze.Player.Player;

public class Armorpotion extends Potions{
	int numvalue=15;
	public Armorpotion() {
		super("护甲药水",40);
	}
	public void PrintInfo() {
		System.out.println("护甲药水：获得"+numvalue+"点护甲值");
	}
	public void Usepotion(Player player,ArrayList<Monster> monsters) {
		player.setArmor(player.getArmor()+numvalue);
	}
	public Armorpotion(Armorpotion other) {
        // 调用父类的构造函数，复制父类属性
        super(other.getName(),other.getValue());
        // 复制 Defense 类的特定属性
        this.numvalue = other.numvalue;
    }

    // 克隆方法
    @Override
    public Potions clone() {
        return new Armorpotion(this);  // 使用拷贝构造函数
    }
}
